<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>修改密码</title>
    <link rel="stylesheet" type="text/css" th:href="@{/css/index.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/css/mystyle.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/css/myceair.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/css/customerinfo.css}">
    <script th:src="@{/js/jquery-1.8.3.min.js}"></script>
    <script th:src="@{/js/jquery.validate.js}" type="text/javascript"></script>
</head>

<body>
<!--header-->
<header id="header">
    <hgroup>

        <address class="text blue">
            <p style="font-size: 15px">欢迎您，<span th:text="${session.customer.username}"></span>&nbsp;&nbsp;<a th:href="@{/home/logout}" style="color: #fff">退出</a></p>
        </address>


        <div class="clear"></div>
    </hgroup>
</header>
<!--end header-->

<!--menu-->
<menu id="menu">
    <nav>
        <ul class="menu_index">
            <a href="customer/customerinfo.jsp">
                <li id="menu-myceair" class="current">我的信息<i></i></li>
            </a>
            <a href="/home/index">
                <li id="menu-booking">预订行程<i></i></li>
            </a>

        </ul>
    </nav>
</menu>
<!--end content-->

<!-- 第一个下拉菜单 -->
<section class="menu-dropdown" id="dropdown-booking" style="display: block; height:320px ">
    <hgroup id="booking">
        <article id="tabTicket" class="b_content block">
            <div id="main-area">
                <div class="position gray">
                    您的位置：<a th:href="@{/home/index}">首页</a> &gt;
                    <h1>我的东航</h1>
                </div>
                <div class="myceair">
                    <div class="left">
                        <div class="home"></div>

                        <div class="menu font14 bold m1"><a th:href="@{/home/customerinfo}">个人信息</a></div>

                        <div class="menu font14 bold m2"><a th:href="@{/home/myorder}">机票订单</a></div>
                        <div class="child">
                        </div>
                        <div class="menu font14 bold m9"><a th:href="@{/home/editcustomerpassword}">更改密码</a>
                        </div>
                        <script src="/resource2/js/myceair/j.tools.js"></script>
                    </div>
                    <div class="right">
                        <div class="personal_info" id="switch">
                            <div class="body">
                                <div class="b_content active" rel="tab1">
                                    <input type="hidden" th:value="${session.customer.password}" id="customerPassword"/>
                                    <form th:action="@{/home/editpwd}" method="post" id="editpassword_form">
                                        <div class="name">
                                            <b class="blue bold">更改密码</b> <span class="gray block">
								<input id="editpassword" style="width:40px; height: 25px;" type="button"
                                       value="保存"></span>

                                        </div>
                                        <div class="row">
                                            <div class="col1">当前密码：</div>
                                            <div class="col2 blue"><input id="password" type="password" name="password"
                                                                          value="">&nbsp;
                                            </div>
                                            <span id="error"></span>
                                        </div>
                                        <div class="row">
                                            <div class="col1">新密码：</div>
                                            <div class="col2 blue"><input id="newpwd" type="password"
                                                                          name="user.password">
                                                &nbsp;
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col1">确认密码：</div>
                                            <div class="col2 blue">
                                                <input id="retypepwd" type="password" name="retypepassword"
                                                       onblur="jugesame()">
                                                &nbsp;
                                            </div>
                                        </div>

                                    </form>
                                </div>
                                <div class="clear"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </article>
    </hgroup>
</section>
<div class="bottom_banner"><img src="http://pic.c-ctrip.com/vacation_v2/bottom_banner1.jpg" class="bottom_banner_l"
                                alt="吉祥航空" width="353" height="111"><img
        src="http://pic.c-ctrip.com/vacation_v2/bottom_banner2.jpg" class="bottom_banner_m" alt="瑞士国际航空公司" width="280"
        height="111"><img src="http://pic.c-ctrip.com/vacation_v2/bottom_banner3.jpg" class="bottom_banner_r" alt="日本航空"
                          width="356" height="111"></div>
<script type="text/javascript">
    $("#editpassword").click(function () {
        var password=$("#password").val();
        var customerPassword=$("#customerPassword").val();
        if(password==""||password==null){
            $('#error').html("密码不能为空");
        }
        else if(password!=customerPassword){
            $('#error').html("原密码错误");
        }else {
            $("#editpassword_form").submit();
        }
    });

</script>
</body>
</html>
